With massive deployment of virtual machines in a data center, a technical solution of abstracting a virtual overlay network by using a physical network tunnel attracts extensive attention. In an existing overlay network virtualization technology, a network virtualization edge (NVE) device is located at a boundary between a virtual network and a physical network, and is responsible for transmitting a packet, which is sent by a host, to another host by using the physical network, so as to implement communication between the hosts, where the virtual network is connected to at least one NVE device, and the NVE device is connected to at least one host by using a switching device in the virtual network. When communication is performed between hosts, the NVE device needs to perform tunnel encapsulation for a packet that is sent by a host to the virtual network, and transmit the packet to another host by using the physical network. When performing the tunnel encapsulation, the NVE device needs to determine an NVE device corresponding to a destination host so that the packet can be sent to the destination host.
Currently, the NVE device uses the following method to determine the NVE device corresponding to the destination host: performing packet learning based on a virtual extensible local area network (VXLAN) control plane, and recording a correspondence between a host and an NVE device by learning a multicast packet or a broadcast packet sent by another NVE device. However, this method is dependent on a large number of multicast packets or broadcast packets, which imposes greater processing pressure on a large-scale physical network.